/**
 * Created by Administrator on 2017/3/10.
 */
$(function(){
    var data=' <li class="hc_List clearfix state_1">'+
   ' <div class="fl home_left rili">'+
        '<div class="home_left_rili">'+
        '<span class="mouth">三月</span>'+
        '<span class="thisDay">26</span>'+
        '</div>'+
        '<span class="home_left_name">日历</span>'+
        '</div>'+
        '<div class="fl home_right">'+
        '<ul class="clearfix">'+
        '<li>'+
        '<div class="shijian_number">1</div>'+
        '<img src="../../images/head_image.png"/>'+
    '</li>'+
        '<li>'+
        '<div class="shijian_number">1</div>'+
        '<img src="../../images/head_image.png"/>'+
        '</li>'+
        '<li>'+
    '<div class="shijian_number">11</div>'+
        '<img src="../../images/head_image.png"/>'+
        '</li>'+
        '<li>'+
        '<div class="shijian_number">111</div>'+
        '<img src="../../images/head_image.png"/>'+
        '</li>'+
        '<li>'+
       '<div class="shijian_number">1</div>'+
       '<img src="../../images/head_image.png"/>'+
       '</li>'+
       '<li>'+
       '<div class="shijian_number">1</div>'+
       '<img src="../../images/head_image.png"/>'+
       '</li>'+
       '<li>'+
       '<div class="shijian_number">11</div>'+
       '<img src="../../images/head_image.png"/>'+
       '</li>'+
       '<li>'+

       '</li>'+
       '</ul>'+
       '</div>'+
       '</li>'+
           '<li class="hc_List clearfix state_2">'+
           '<div class="fl home_left rili">'+
           '<div class="home_left_rili">'+

           '</div>'+
           '<span class="home_left_name">课程表</span>'+
           '</div>'+
           '<div class="fl home_right">'+
           '<ul class="clearfix">'+
           '<li>'+
           '<span>第一节课</span>'+
           '<span>明天&nbsp;11:30</span>'+
           '</li>'+
           '<li>'+
           '<span class="">第一节课</span>'+
           '<span>01-23&nbsp;11:30</span>'+
           '</li>'+
           '<li>'+
           '<span>第一节课</span>'+
           '<span>明天&nbsp;11:30</span>'+
           '</li>'+
           '<li>'+
           '<span class="">第一节课</span>'+
           '<span>01-23&nbsp;11:30</span>'+
           '</li>'+
           '<li>'+
           '<span>第一节课</span>'+
           '<span>明天&nbsp;11:30</span>'+
           '</li>'+
           '<li>'+
           '<span class="">第一节课</span>'+
           '<span>01-23&nbsp;11:30</span>'+
           '</li>'+
           '<li>'+
           '<span>第一节课</span>'+
           '<span>明天&nbsp;11:30</span>'+
           '</li>'+
           '<li>'+
           '<span class="">第一节课</span>'+
           '<span>01-23&nbsp;11:30</span>'+
           '</li>'+
           '</ul>'+
           '</div>'+
           '</li>'+
           '<li class="hc_List clearfix state_3">'+
            '<div class="fl home_left rili">'+
            '<div class="home_left_rili">'+
            '</div>'+
            '<span class="home_left_name">小账本</span>'+
            '</div>'+
            '<div class="fl home_right">'+
            '<ul class="clearfix">'+
            '<li>'+
            '<span>·&nbsp;姓名</span>'+
             '<span>剩余06天</span>'+
           '</li>'+
           '<li>'+
           '<span>·&nbsp;姓名</span>'+
           '<span>剩余06天</span>'+
           '</li>'+
           '<li>'+
           '<span>·&nbsp;姓名</span>'+
           '<span>剩余06天</span>'+
           '</li>'+
           '<li>'+
           '<span>·&nbsp;姓名</span>'+
           '<span>剩余06天</span>'+
           '</li>'+
           '<li>'+
           '<span>·&nbsp;姓名</span>'+
           '<span>剩余06天</span>'+
           '</li>'+
           '<li>'+
           '<span>·&nbsp;姓名</span>'+
           '<span>剩余06天</span>'+
           '</li>'+
           '<li>'+
           '<span>·&nbsp;姓名</span>'+
           '<span>剩余06天</span>'+
           '</li>'+
           '<li>'+
           '<span>·&nbsp;姓名</span>'+
           '<span>剩余06天</span>'+
           '</li>'+
           '</ul>'+
           '</div>'+
           '</li>';

    var xzb="<ul class='xzb_layer clearfix'>" +
                "<li class='xzb_info'>" +
                    "<a href='../calendar/index.html'>"+
                        "<div class='xzb_image'>"+
                        "<img src='../../images/head_image.png'/>"+
                        "</div>"+
                        "<span class='xzb_name graycolor'>人名三</span>"+
                        "<span class='xzb_money'>任务1</span>"+
                        "<span class='xzb_day graycolor'>[剩余07天]</span>"+
                     "</a>"+
                "</li>"+
                "<li class='xzb_info'>" +
                 "<a href='../calendar/index.html'>"+
                    "<div class='xzb_image'>"+
                    "<img src='../../images/head_image.png'/>"+
                    "</div>"+
                    "<span class='xzb_name graycolor'>人名三</span>"+
                    "<span class='xzb_money'>任务1</span>"+
                    "<span class='xzb_day graycolor'>[剩余07天]</span>"+
                    "</a>"+
                "</li>"+
                "<li class='xzb_info'>" +
                  "<a href='../calendar/index.html'>"+
                    "<div class='xzb_image'>"+
                    "<img src='../../images/head_image.png'/>"+
                    "</div>"+
                    "<span class='xzb_name graycolor'>人名三</span>"+
                    "<span class='xzb_money'>任务1</span>"+
                    "<span class='xzb_day graycolor'>[剩余07天]</span>"+
                  "</a>"+
                "</li>"+
                "<li class='xzb_info'>" +
                  "<a href='../calendar/index.html'>"+
                    "<div class='xzb_image'>"+
                    "<img src='../../images/head_image.png'/>"+
                    "</div>"+
                    "<span class='xzb_name graycolor'>人名三</span>"+
                    "<span class='xzb_money'>任务1</span>"+
                    "<span class='xzb_day graycolor'>[剩余07天]</span>"+
                   "</a>"+
                "</li>"+
              "</ul>";

    $(".home_title_List").click(function(){
        if($(".home_content").has("li").length==0){
            $(this).parents().children("li").removeClass("xianshi_1");
            $(this).addClass("xianshi_1");
            $(".home_content").html(data);
            /*跳转任务栏页面*/
            $(".state_1 .home_left").click(function(){
                self.location='../calendar/index.html';
            });
            $(".state_1 .home_right ul li").click(function(){
                layer.open({
                    title: [
                        '任务详情',
                        'background-color:#DB4B40; color:#fff;'
                    ]
                    ,className:'yuejihua'
                    ,anim: 'up'
                    ,content: xzb
                    ,btn: ['确认']
                });

            });
            $(".state_2 .home_left").click(function(){
                self.location='../schedule/schedule_deteil.html';
            });
            $(".state_2 .home_right ul li").click(function(){
                self.location='../schedule/multi_syllabus.html';
            });
            $(".state_3 .home_left ").click(function(){
                self.location='../account/account-index.html';
            });
            $(".state_3 .home_right ul li").click(function(){
                self.location='../account/account-index.html';
            });
        }else{
            $(".home_content").html(" ");
            $(this).parents().children("li").addClass("xianshi_1");
        }
    });

})